<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>首页</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f4f4f4;
        }

        .container {
            width: 80%;
            margin: 20px auto;
            overflow: hidden;
        }

        header {
            background: #333;
            color: #fff;
            padding: 20px;
            text-align: center;
        }

        .login-btn {
            position: absolute;
            top: 50px;
            right: 40px;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            border: 1px solid white;
            padding: 8px 16px;
            cursor: pointer;
            z-index: 1000;
        }
        .login-btn:hover {
            background: rgba(255, 255, 255, 0.5);
        }

        nav {
            display: flex;
            justify-content: center;
            background: #555;
            padding: 10px 0;
        }

        nav a {
            color: white;
            text-decoration: none;
            padding: 0 15px;
        }

        nav a:hover {
            background: #444;
        }

        .search-box {
            text-align: center;
            margin-bottom: 20px;
        }

        .search-box input[type="text"] {
            padding: 10px;
            width: 70%;
            margin-right: 5px;
        }

        .search-box input[type="button"] {
            padding: 10px 20px;
            background: #333;
            color: #fff;
            border: none;
            cursor: pointer;
        }

        .search-box input[type="button"]:hover {
            background: #444;
        }

        .news-list {
            list-style: none;
            padding: 0;
        }

        .news-list li {
            background: #fff;
            border: 1px solid #ddd;
            margin-bottom: 10px;
            padding: 10px;
        }

        .news-list li:hover {
            background: #f9f9f9;
        }

        .news-title {
            font-weight: bold;
        }

        .news-summary {
            color: #666;
        }

        footer {
            background: #333;
            color: #fff;
            text-align: center;
            padding: 10px 0;
            position: relative;
            bottom: 0;
            width: 100%;
        }
    </style>
</head>

<body>
<header>
    <h1>欢迎 <span class="username">访客</span> 来到蜗牛新闻网</h1>
    <button class="login-btn" onclick="window.location.href='login.html'">登录/注册</button>
</header>
<nav class="tags"></nav>

<div class="container">
    <div class="search-box">
        <form>
            <label>
                <input type="text" class="search-content" placeholder="搜索新闻...">
            </label>
            <input type="button" class="search" value="搜索">
        </form>
    </div>
    <h2>新闻列表</h2>
    <ul class="news-list">
        <li>
            <div class="news-title">标题</div>
            <div class="news-summary">摘要...</div>
            <a href="news_detail.html">阅读详情</a>
        </li>
        <!-- 复制上面的 <li> 来创建更多的新闻条目 -->
    </ul>
</div>
<footer>
    <p>版权所有 © 2024 新闻网站</p>
</footer>
</body>
<script src="./js/jquery-3.7.1.min.js"></script>
<script type="module" src="index.js"></script>

</html>